home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / pvquan16.zip / BBALL.VAR < prev    next >
Text File  |  1992-07-02  |  1KB  |  38 lines

  1. num_scenes = 26
  2.  
  3.             { the light source }
  4. light_x = 3.0
  5. light_y = 3.0
  6. light_z = -2.0
  7.  
  8.  
  9.             { the ball}
  10. pi = 3.141592654
  11.  
  12. x_size = 1.0 / y_size
  13. y_size = s1_ball_y * (time < time_contact) + s2_ball_y*(time >= time_contact)
  14. z_size = 1.0
  15.  
  16. start_height = 1.8
  17. ball_z = 10.0
  18. ball_x = -2.2
  19. floor_height = -2.5
  20. height = start_height - (s1_ball_height * (time < time_contact) + s2_ball_height*(time >= time_contact))
  21.  
  22. time_contact = (2/accel*(start_height - floor_height - 1))^(1/2)
  23. quarter_period = pi/(2*omega)
  24. time_final = time_contact + quarter_period
  25. time_inc = time_final / num_scenes
  26. time = time + time_inc, 0
  27.  
  28.     { stage 1 - the ball falling }
  29. accel = 9.81        { acceleration due to gravity }
  30. s1_ball_height = 1/2 * accel * time^2
  31. s1_ball_y = 1.0
  32.  
  33.  
  34.     { stage 2 - the ball compressing }
  35. omega = 17.0        { natural frequency of oscillation of elastic ball }
  36. s2_ball_height = 0.5*accel*time_contact^2 + (accel*time_contact/omega)*sin(omega*(time-time_contact))
  37. s2_ball_y = 1/(height-floor_height)
  38.